package jonggyuni.basic;

public class J08_Num55 {

	public static void main(String[] args) {
		// 가.
		
		int ga [] = new int [10];
		int na [] = new int [11];
		int da [] = new int [10];
		int ra [] = new int [10];
		//int ma [] = new int [10];
		
		
		//Q1)1 2 3 4 5 6 7 8 9 10
		int num1[] = new int[10];//10개의 정수를 저장할 배열 생성
		
		for(int i=0;i<num1.length;i++){//배열에 순차적으로 값 저장
			num1[i] = i+1;
		}
		for(int i : num1){//배열에 저장된 값 모두 출력
			System.out.print(i + " ");
		}				
		System.out.println("");
		
		
		
		//Q2)0 2 4 6 8 10 12 14 16 18 20
		int num2[] = new int[11];
		for(int i =0;i<11;i++){
			num2[i]= i+i;
		}
		for(int i:num2){
			System.out.print(i + " ");
		}
		
		System.out.println("");
		
		//Q3) 
		int num3[] = new int[10];
		for(int i =1; i<=num3.length; i++){
			num3[i-1] = i*i;
		}
		for(int i :num3){
			System.out.print(i + " ");
		}
		System.out.println("");
		//Q4)
		int num4[] = new int[10];
		for(int i : num4){
			System.out.print(i + " ");
		}
		
		System.out.println("");
		
		//Q5)1 4 9 16 9 7 4 9 11
		int num5[] = new int[9];
/*		num5[0]=1; num5[1]=4;
		num5[2]=9; num5[3]=16;
		num5[4]=9; num5[5]=7;
		num5[6]=4; num5[7]=9;
		num5[8]=11; */
		num5=new int[]{1,4,9,16,9,7,4,9,11};
		for(int i=0;i<9;i++){
			System.out.print(num5[i]+ " ");
		}
		System.out.println("");
		
		
		
		
		System.out.print("가 :");
		for(int i=0; i<10;i++){
			ga[i]=i+1;
			System.out.print(ga[i]+" ");
		}
		System.out.println("");
		
		System.out.print("나 :");
		na[0]=0;
		System.out.print(na[0] + " ");
		for(int i=1; i<11;i++){
			na[i]=i*2;
			System.out.print(na[i]+ " ");
		}
		
		System.out.println("");
		System.out.print("다 :");
		for(int i=0;i<10;i++){
			da[i] =((i+1)*(i+1));
			System.out.print(da[i]+ " ");
		}
		
		System.out.println("");
		System.out.print("라 :");
		for(int i=0;i<10;i++){
			ra[i]= (i *0);
			System.out.print(ra[i]+ " ");
		}
		
/*		System.out.println("마 :");
		for(int i=0;i<10;i++){
			ma[i]=
		}
		*/
		
	}

}
